<template>
    <div>
        <h1>首页</h1>
        <button @click="add">number的值是：{{number}}</button>
        <h3>count的值是：{{$store.state.count}}</h3>
    </div>
</template>
<script>
import{ ref,onMounted } from "vue"
export default {
    data(){
        return{
            number:0
        };
    },
    methods:{
        add(){
            this.number++;
        }
    },
    mounted(){
        console.log("number的值是："+this.number)
    }
};
</script>
<style scoped></style>